<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <body>

        <ui:composition template="./WEB-INF/templates/template_register.xhtml">

            <ui:define name="content">
                <f:loadBundle basename="org.inftel.scrum.message.Messages" var="msg"/>      
                <div class="grid_16">
                    <h:form>  

                        <p:panel id="dialog" style="border-color: #9ACD32;" header="#{msg.registrationheader}" >
                            <br/>
                            <h:panelGrid>
                                <h:outputLabel id="notice" 
                                               value="#{msg.registrationadvice}" />  <br/>

                                <p:messages id="messages"/>
                                <br/>
                                <h:outputLabel for="name" value="#{msg.registrationname}" />  
                                <p:inputText id="name" 
                                             label="Name"
                                             value="#{registerBean.name}"/>  
                                <br/>
                                <h:outputLabel for="surname" value="#{msg.registrationsurname}" />  
                                <p:inputText id="surname" 
                                             label="Surname"
                                             value="#{registerBean.surname}"/>  
                                <br/>
                                <h:outputLabel for="email" value="#{msg.registrationemail}" />  
                                <p:inputText id="email" 
                                             label="Email"
                                             value="#{registerBean.email}"/>
                                <br/>
                                <h:outputLabel for="dni" value="#{msg.registrationdni}" />  
                                <p:inputText id="dni"                                              
                                             value="#{registerBean.dni}"/>
                                <br/>
                                <h:outputLabel for="telephone" value="#{msg.registrationtelephone}" />  
                                <p:inputText id="telephone"                                              
                                             value="#{registerBean.telephone}"/>
                                <br/>
                                <h:outputLabel for="password1" value="#{msg.registrationpassword}" />  
                                <p:password id="password1" 
                                            value="#{registerBean.password}" 
                                            feedback="true"
                                            match="password2" 
                                            label="Password 1"/>
                                <br/>
                                <h:outputLabel for="password2" value="#{msg.registrationrepeat}" />  
                                <p:password id="password2" 
                                            value="#{registerBean.password}" 
                                            feedback="false"
                                            label="Password 2"/>
                                <br/>
                                <h:outputLabel for="secretKey" value="#{msg.registrationkey}" />
                                <p:captcha label="Captcha" 
                                           language="en" 
                                           theme="clean"/>  
                                <br/>
                                <div align="right">
                                    <p:commandButton style="color: #000;
                                                     border: 1px solid #2BB02B;
                                                     border-radius: 3px;
                                                     -webkit-border-radius: 3px;
                                                     -moz-border-radius: 3px;
                                                     margin: 0;
                                                     padding: .2em 1em;
                                                     background-color: cadetblue;
                                                     font-weight: normal;
                                                     font-size: 12px"
                                                     value="#{msg.registrationfinish}"
                                                     update="growl"                                                 
                                                     action="#{registerBean.doRegister}" 
                                                     ajax="false"/>
                                </div>
                            </h:panelGrid>
                        </p:panel>
                    </h:form>
                </div>
                <div class="clear"></div>
                <br/>
                <div class="grid_16" align="right">
                    <h:form>
                        <p:commandButton style="color: #000;
                                         border: 1px solid #2BB02B;
                                         border-radius: 3px;
                                         -webkit-border-radius: 3px;
                                         -moz-border-radius: 3px;
                                         margin: 0;
                                         padding: .2em 1em;
                                         background-color: cadetblue;
                                         font-weight: normal;
                                         font-size: 12px"
                                         value="#{msg.registrationgoback}"          
                                         action="#{registerBean.returnLogin}" 
                                         ajax="false"/>
                    </h:form>
                </div>
                <div class="clear"></div>

            </ui:define>

        </ui:composition>

    </body>
</html>
